package com.kanshu.basictest.ui.activity.ipc;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;

import com.kanshu.basictest.R;
import com.kanshu.basictest.model.menu.MenuItem;
import com.kanshu.basictest.ui.activity.ipc.provider.ProviderTestActivity;
import com.kanshu.basictest.ui.base.BaseListMenuActivity;

import java.util.ArrayList;
import java.util.List;

public class IPCIndexActivity extends BaseListMenuActivity {
    @Override
    protected List<? extends MenuItem> provideMenuData() {
        List<MenuItem> menuItems = new ArrayList<>();
        menuItems.add(0, new MenuItem("ContentProvider", R.color.blue_200));
        return menuItems;
    }

    @Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        Intent intent = new Intent();
        switch (i) {
            case 0:
                intent.setClass(this, ProviderTestActivity.class);
                break;
            default:
                break;
        }

        startActivity(intent);
    }

    @Override
    protected String provideBarTitle() {
        return "IPC";
    }
}
